<?php use_helper("i18n")?>
<?php $culture = $sf_user->getCulture();?>
<div id="nav-main">
<div id="logo"><img src="/images/logo.png" width="300" height="85"></div>
<div id="top-nav">
  <ul>
    <li><a href="#">เกี่ยวกับ TMD</a></li>
    <li><a href="#">วิชาการ</a></li>
    <li><a href="#">บริการ</a></li>
    <li><a href="#">ข่าวสาร</a></li>
    <li><a href="#">ประกาศ</a></li>
    <li><a href="#">ติดต่อ TMD</a></li>
  </ul>
</div>
<div class="megamenu_wrapper megamenu_light_theme">
    <div class="megamenu_container megamenu_black">
        <ul class="megamenu">
            <li class="active"><a href="<?php echo url_for( "home/index" )?>" class="menuitem_nodrop">หน้าหลัก</a></li>
            <li><a href="#" class="menuitem_drop"><?php echo __("Forecast")#พยากรณ์อากาศ?></a>
                <div class="dropdown_5columns">
                    <div class="col_full firstcolumn">
  						<div id="nav-forecast">
                        <div id="nav-forecast-left">
                        <div class="blue-txt" style="margin-top:5px;"><strong>พยากรณ์อากาศ</strong></div>
                        <ul class="plus">
                            <li><a href="<?php echo url_for( "forecast/index" )?>">พยากรณ์อากาศประจำวัน</a></li>
                            <li><a href="#">พยากรณ์อากาศ 7 วัน</a></li>
                            <li><a href="#">พยากรณ์อากาศ 3 เดือน</a></li>
                            <li><a href="#">พยากรณ์อากาศเพื่อการเดินเรือ</a></li>
                        </ul>
                        </div>
                        <div id="nav-forecast-right">
                          <div class="nav-forecast-thumb"><a href="#" class="blue-txt-link"><img src="<?php echo image_path('/images/nav-forecast-thumb-1.jpg')?>" width="167" height="55"><div class="hspace-7">คาดหมายอากาศฤดูหนาว</div></a></div>
                          <div class="nav-forecast-thumb"><a href="#" class="blue-txt-link"><img src="<?php echo image_path('/images/nav-forecast-thumb-2.jpg')?>" width="167" height="55"><div class="hspace-7">คาดหมายอากาศฤดูหนาว</div></a></div>
                          <div class="nav-forecast-thumb"><a href="#" class="blue-txt-link"><img src="<?php echo image_path('/images/nav-forecast-thumb-3.jpg')?>" width="167" height="55"><div class="hspace-7">พยากรณ์อากาศเพื่อการขนส่ง</div></a></div>
                        </div>
                        </div>
                    </div>
                </div>
            </li>
            <li><a href="<?php echo url_for( "climate/index" )?>" class="menuitem_drop"><?php echo __("Weather")#สภาพอากาศ?></a>
                <div class="dropdown_fullwidth">
                	<?php $region = $regions[1]?>
                    <div class="col_one_quarter firstcolumn">
                        <div class="blue-txt" style="margin-top:5px;"><strong><?php echo TMDService::renderI18n($region, "getSregionName", $culture)?></strong></div>
                        <ul class="plus" style="float:left; width:50%;">
                        <?php $i = 0;?>
                        <?php $column = 0; $row = 0; $totalRegion = count($regions); $regionCount = 0?>
                        <?php $provinces = $region->getProvincess(); foreach( $provinces as $province ): ?>
                        	<?php if( $i > ceil( count($provinces) / 2 ) ):?>
                        		</ul>
                        		<ul class="plus" style="float:left; width:50%;">
                        	<?php endif?>
                        	
                        	<li><a href="<?php echo url_for( "weatherProvince/index?regionIndex=1&regionId=". $region->getIgeographicRegion() ."&provinceId=" . $province->getIprovinceId() )?>"><?php echo TMDService::renderI18n($province, "getSname", $culture)?></a></li>
                        	<?php $i++?>
                        <?php endforeach;?>
                        </ul> 
                    </div>
                
                    <?php $region = $regions[2]?>
                    <div class="col_one_quarter">
                        <div class="blue-txt" style="margin-top:5px;"><strong><?php echo TMDService::renderI18n($region, "getSregionName", $culture)?></strong></div>
                        <ul class="plus" style="float:left; width:50%;">
                        <?php $i = 0;?>
                        <?php $column = 0; $row = 0; $totalRegion = count($regions); $regionCount = 0?>
                        <?php $provinces = $region->getProvincess(); foreach( $provinces as $province ): ?>
                        	<?php if( $i > ceil( count($provinces) / 2 ) ):?>
                        		</ul>
                        		<ul class="plus" style="float:left; width:50%;">
                        	<?php endif?>
                        	
                        	<li><a href="<?php echo url_for( "weatherProvince/index?regionIndex=2&regionId=". $region->getIgeographicRegion() ."&provinceId=" . $province->getIprovinceId() )?>"><?php echo TMDService::renderI18n($province, "getSname", $culture)?></a></li>
                        	<?php $i++?>
                        <?php endforeach;?>
                        </ul> 
                    </div>
                    
                    <?php $region = $regions[3]?>
                    <div class="col_one_quarter">
                        <div class="blue-txt" style="margin-top:5px;"><strong><?php echo TMDService::renderI18n($region, "getSregionName", $culture)?></strong></div>
                        <ul class="plus" style="float:left; width:50%;">
                        <?php $i = 0;?>
                        <?php $column = 0; $row = 0; $totalRegion = count($regions); $regionCount = 0?>
                        <?php $provinces = $region->getProvincess(); foreach( $provinces as $province ): ?>
                        	<?php if( $i > ceil( count($provinces) / 2 ) ):?>
                        		</ul>
                        		<ul class="plus" style="float:left; width:50%;">
                        	<?php endif?>
                        	
                        	<li><a href="<?php echo url_for( "weatherProvince/index?regionIndex=3&regionId=". $region->getIgeographicRegion() ."&provinceId=" . $province->getIprovinceId() )?>"><?php echo TMDService::renderI18n($province, "getSname", $culture)?></a></li>
                        	<?php $i++?>
                        <?php endforeach;?>
                        </ul> 
                    </div>
                    
                    <div class="col_one_quarter">
                        <div class="blue-txt" style="margin-top:5px;"><strong>พยากรณ์อากาศ</strong></div>
                        <ul class="plus">
                            <li><a href="#">พยากรณ์อากาศประจำวัน</a></li>
                            <li><a href="#">พยากรณ์อากาศ 7 วัน</a></li>
                            <li><a href="#">พยากรณ์อากาศ 3 เดือน</a></li>
                            <li><a href="#">พยากรณ์อากาศเพื่อการเดินเรือ</a></li>
                        </ul>
                    </div>
                    
                    <?php $region = $regions[5]?>
                    <div class="col_one_quarter firstcolumn">
                        <div class="blue-txt" style="margin-top:5px;"><strong><?php echo TMDService::renderI18n($region, "getSregionName", $culture)?></strong></div>
                        <ul class="plus" style="float:left; width:50%;">
                        <?php $i = 0;?>
                        <?php $column = 0; $row = 0; $totalRegion = count($regions); $regionCount = 0?>
                        <?php $provinces = $region->getProvincess(); foreach( $provinces as $province ): ?>
                        	<?php if( $i > ceil( count($provinces) / 2 ) ):?>
                        		</ul>
                        		<ul class="plus" style="float:left; width:50%;">
                        	<?php endif?>
                        	
                        	<li><a href="<?php echo url_for( "weatherProvince/index?regionIndex=5&regionId=". $region->getIgeographicRegion() ."&provinceId=" . $province->getIprovinceId() )?>"><?php echo TMDService::renderI18n($province, "getSname", $culture)?></a></li>
                        	<?php $i++?>
                        <?php endforeach;?>
                        </ul> 
                    </div>
                    
                    <?php $region = $regions[6]?>
                    <div class="col_one_quarter">
                        <div class="blue-txt" style="margin-top:5px;"><strong><?php echo TMDService::renderI18n($region, "getSregionName", $culture)?></strong></div>
                        <ul class="plus" style="float:left; width:50%;">
                        <?php $i = 0;?>
                        <?php $column = 0; $row = 0; $totalRegion = count($regions); $regionCount = 0?>
                        <?php $provinces = $region->getProvincess(); foreach( $provinces as $province ): ?>
                        	<li><a href="<?php echo url_for( "weatherProvince/index?regionIndex=6&regionId=". $region->getIgeographicRegion() ."&provinceId=" . $province->getIprovinceId() )?>"><?php echo TMDService::renderI18n($province, "getSname", $culture)?></a></li>
                        	<?php $i++?>
                        <?php endforeach;?>
                        </ul> 
                    </div>
                    
                    <?php $region = $regions[4]?>
                    <div class="col_one_quarter">
                        <div class="blue-txt" style="margin-top:5px;"><strong><?php echo TMDService::renderI18n($region, "getSregionName", $culture)?></strong></div>
                        <ul class="plus" style="float:left; width:50%;">
                        <?php $i = 0;?>
                        <?php $column = 0; $row = 0; $totalRegion = count($regions); $regionCount = 0?>
                        <?php $provinces = $region->getProvincess(); foreach( $provinces as $province ): ?>
                        	<?php if( $i > ceil( count($provinces) / 2 ) ):?>
                        		</ul>
                        		<ul class="plus" style="float:left; width:50%;">
                        	<?php endif?>
                        	
                        	<li><a href="<?php echo url_for( "weatherProvince/index?regionIndex=4&regionId=". $region->getIgeographicRegion() ."&provinceId=" . $province->getIprovinceId() )?>"><?php echo TMDService::renderI18n($province, "getSname", $culture)?></a></li>
                        	<?php $i++?>
                        <?php endforeach;?>
                        </ul> 
                    </div>
                    
                    <div class="col_one_quarter">
                        <div id="nav-weather">
                        	<div class="nav-weather-thumb"><a href="#" class="blue-txt-link"><img src="<?php echo image_path('/images/nav-weather-thumb-1.jpg')?>" width="167" height="55"><div class="hspace-7">อากาศต่างประเทศ</div></a></div>
                            <div class="nav-weather-thumb"><a href="#" class="blue-txt-link"><img src="<?php echo image_path('/images/nav-weather-thumb-2.jpg')?>" width="167" height="55"><div class="hspace-7">อุตุวิทยาเพื่อการเกษตร</div></a></div>
                        </div>
                    </div>
                </div>
            </li>
            <li class="menuitem_nodrop"><a href="<?php echo url_for( "climate/index" )?>"><?php echo __("Climate")#ภูมิอากาศ?></a></li>
        </ul>
    </div>
</div>
<div id="form_search">
<form class="form-wrapper cf">
<input type="text" placeholder="" required>
<button type="submit">Search</button>
</form>   
</div>
</div>